package com.byxy.service.impl;

import com.byxy.mapper.CategoryMapper;
import com.byxy.po.Category;
import com.byxy.service.CategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService<Category> {


    @Resource
    private CategoryMapper categoryMapper;

    @Override
    public int deleteByPrimaryKey(Category key) {
        return categoryMapper.deleteByPrimaryKey(key);
    }

    @Override
    public int insert(Category record) {
        return categoryMapper.insert(record);
    }

    @Override
    public int insertSelective(Category record) {
        return categoryMapper.insertSelective(record);
    }

    @Override
    public Category selectOne(Category record) {
        return categoryMapper.selectOne(record);
    }

    @Override
    public int updateByPrimaryKey(Category record) {
        return categoryMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Category> selectAll() {
        return categoryMapper.selectAll();
    }
}
